package cn.itsource.hrm.errorcode;

public enum ErrorCode {
    TENANT_NAME_ISNULL(001,"公司名不可为空[%s]"),
    EMAIL_INVALID(002,"邮箱编码不正确[%s]"),
    PHONE_INVALID(003,"电话号码格式不正确[%s]"),
    USERNAME_ALREADY_REGISTERED(004,"用户名已经被注册[%s]");
    private int code;
    private String message;
    ErrorCode(int code, String message) {
        this.code=code;
        this.message=message;
    }
    public int getCode(){
        return this.code;
    }
    public String getMessage(){
        return String.format(this.message,this.code);
    }
}
